﻿using System;

namespace GaleSong
{
    public interface ILogService
    {
        void ShowMessage(string message, LogLevel logLevel = LogLevel.Operation);
        void ShowMessage(string message, object status);
        void ShowProgress(double currentValue, double allValue);
        void FilterLog();
        void SaveLog();
    }

    public class LogItem
    {
        public DateTime Time { get; set; }
        public string Message { get; set; }
        public LogLevel Level { get; set; }

        public int ResourceId { get; set; }
    }

    public enum LogLevel : int
    {
        All = Crash | Error | Warning | StartUp | Close | Operation,
        Crash = 1,
        Error = 2,
        Warning = 4,
        StartUp = 8,
        Close = 16,
        Operation = 32,
    }
}